package com.medical.medical.service;

import com.github.pagehelper.PageInfo;
import com.medical.medical.entity.Notice;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;


public interface NoticeService {


    PageInfo<Notice> getAllNotice(Integer pageNum);
    /**
      * @description 根据条件查询系统更新公告条数
      * @author GUOYN
      * @date 2022-09-15 09:22:34  * @param startTime
     * @param terminationTime
      * @return {@link int}
      */
    int getNoticeCount(Date startTime, Date terminationTime,int noticeType);
    /**
      * @description 根据条件查询系统更新公告
      * @author GUOYN
      * @date 2022-09-15 09:29:53  * @param startTime
     * @param terminationTime
     * @param noticeType
     * @param current
      * @return {@link List< Notice>}
      */
    List<Notice> getSystemNoticeList(Date startTime,
                                     Date terminationTime,
                                     int noticeType,
                                     int current);
    /**
      * @description 根据id获得当前系统更新公告
      * @author GUOYN
      * @date 2022-09-15 12:14:20  * @param id
      * @return {@link Notice}
      */
    Notice getSystemNoticeView(int id,int noticeType);
    /**
      * @description 添加系统更新公告
      * @author GUOYN
      * @date 2022-09-15 14:38:09  * @param notice
      * @return {@link boolean}
      */
    boolean addSystemNotice(Notice notice);
    /**
      * @description 修改系统更新公告（发布状态/发布时间）
      * @author GUOYN
      * @date 2022-09-15 15:19:40  * @param notice
      * @return {@link boolean}
      */
    boolean updateSystemNotice(Notice notice);

    /*
     * @description: 根据名称模糊查询公告
     * @author: qin
     * No such property: code for class: Script1
     * @return:
     * @time: 2022/9/24 11:18
     */
    PageInfo<Notice> getNoticeByNoticeName(Integer pageNum, String noticeName);

    /*
     * @description: 根据id删除公告
     * @author: qin
     * No such property: code for class: Script1
     * @return:
     * @time: 2022/9/24 11:18
     */
    int deleteById(String noticeId);

    /*
     * @description: 添加公告
     * @author: qin
     * No such property: code for class: Script1
     * @return:
     * @time: 2022/9/24 12:05
     */
    int addNotice(Notice notice);
    /**
      * @description 查询最新公告信息
      * @author GUOYN
      * @date 2022-09-26 11:19:51  * @param
      * @return {@link Notice}
      */
    Notice getNewSystemNoticeView();
}
